﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using Edge.Business.Entities;
using Edge.Common.Utils;
using Iesi.Collections.Generic;
using Shop.Business.Domain.Catalog.Parameter;
using Shop.Business.Domain.Customers;
using Shop.Business.Domain.Pricing;

namespace Shop.Business.Domain.Catalog
{
    /// <summary>
    /// Users object for NHibernate mapped table 'product'.
    /// </summary>
    [Serializable]
    public class Product : EntityWithStat<int>
    {

        protected string name;
        protected string description;
        protected ProductGroup group;
        protected string brandArt;
        protected bool visible = true;
        protected int qty;
        protected decimal price;
        protected PriceItem priceItem;


        public virtual int Qty
        {
            get { return qty; }
            set { qty = value; }
        }

        public virtual decimal Price
        {
            get { return price; }
            set { price = value; }
        }

        public virtual PriceItem PriceItem
        {
            get { return priceItem; }
            set { priceItem = value; }
        }

        public virtual string Name
        {
            get { return name; }
            set { name = value; }
        }

        public virtual string Description
        {
            get { return description; }
            set { description = value; }
        }

        public virtual ProductGroup Group
        {
            get { return group; }
            set { group = value; }
        }

        public virtual bool Visible
        {
            get { return visible; }
            set { visible = value; }
        }


        public virtual string BrandArt
        {
            get { return brandArt; }
            set { brandArt = value; }
        }

        public virtual string AvailableStr
        {
            get { return qty > 0 ? "В наличии" : "Под заказ"; }
        }
       
    }

   
}